 package com.coc.util;
 
 import com.coc.bean.CocSetting;
 import com.coc.dao.EloUserDAO;
 import java.util.Timer;
 import javax.servlet.ServletContextEvent;
 import javax.servlet.ServletContextListener;
 import javax.servlet.http.HttpServlet;
 import org.springframework.context.ApplicationContext;
 import org.springframework.web.context.support.WebApplicationContextUtils;
 
 public class SystemListener extends HttpServlet
   implements ServletContextListener
 {
   private Timer timer = null;
   private ApplicationContext ctx;
 
   public void contextDestroyed(ServletContextEvent arg0)
   {
   }
 
   public void contextInitialized(ServletContextEvent sce)
   {
     try
     {
       this.ctx = 
         WebApplicationContextUtils.getRequiredWebApplicationContext(sce.getServletContext());
       EloUserDAO eud = (EloUserDAO)this.ctx.getBean("eloUserDAO");
       CocSetting cs = eud.findcs();
       boolean ext = false;
       if (cs.getIsext().equals("1")) {
         ext = true;
       }
       String[] servers = cs.getServers().split(",");
       MemCacheUtil.setServerlist(servers);
       MemCacheUtil.setIsExt(ext);
     } catch (Exception e) {
       e.printStackTrace();
     }
   }
 }

/* Location:           C:\Work\WorkSpace\classes\
 * Qualified Name:     com.coc.util.SystemListener
 * JD-Core Version:    0.6.2
 */